<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
	<title>字典管理</title>
	<meta name="renderer" content="webkit">
	<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
	<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
	<meta name="apple-mobile-web-app-status-bar-style" content="black">
	<meta name="apple-mobile-web-app-capable" content="yes">
	<meta name="format-detection" content="telephone=no">
	<link rel="stylesheet" href="${s.base}/js/layui/css/layui.css" media="all" />
	<link rel="stylesheet" href="${s.base}/css/base/base.css" media="all" />
</head>
<body class="childrenBody">
<form class="layui-form">
	<input type="hidden" id="id" name="id" value="${sysDictContent.id}" />
	<div class="layui-form-item layui-row layui-col-xs12">
		<label class="layui-form-label"><span class="red">*</span>&nbsp;&nbsp;字典项</label>
		<div class="layui-input-block">
			<input type="text"  class="layui-input"  disabled name="dictType" value="${sysDictContent.dictType}"
				   placeholder="请输入字典项"  lay-verify="required" autocomplete="off">
		</div>
	</div>
	<div class="layui-form-item layui-row layui-col-xs12">
		<label class="layui-form-label"><span class="red">*</span>&nbsp;&nbsp;字典标签</label>
		<div class="layui-input-block">
			<input type="text"  class="layui-input" name="name" value="${sysDictContent.name}"
				   placeholder="请输入字典标签"  lay-verify="required" autocomplete="off">
		</div>
	</div>
	<div class="layui-form-item layui-row layui-col-xs12">
		<label class="layui-form-label"><span class="red">*</span>&nbsp;&nbsp;字典键值</label>
		<div class="layui-input-block">
			<input type="number"  class="layui-input" name="value" value="${sysDictContent.value}"
				   placeholder="请输入字典键值"  lay-verify="required" autocomplete="off">
		</div>
	</div>

	<div class="layui-form-item layui-row layui-col-xs12">
		<label class="layui-form-label"><span class="red">*</span>&nbsp;&nbsp;有效状态</label>
		<div class="layui-input-block">
			<select name="status" id="status">

			</select>
		</div>
	</div>
	<div class="layui-form-item layui-row layui-col-xs12">
		<label class="layui-form-label"><span class="red">*</span>&nbsp;&nbsp;排序</label>
		<div class="layui-input-block">
			<input type="number"  class="layui-input" name="sort" value="${sysDictContent.sort}"
				   placeholder="请输入排序,数字越大越靠前！"  lay-verify="required" autocomplete="off">
		</div>
	</div>
	<div class="layui-form-item layui-row layui-col-xs12">
		<div class="layui-input-block">
			<button class="layui-btn layui-btn-sm" lay-submit="" lay-filter="submitBtn">确定</button>
			<button type="reset" class="layui-btn layui-btn-sm layui-btn-primary cancel">取消</button>
		</div>
	</div>
</form>
<script type="text/javascript" src="${s.base}/js/layui/layui.js"></script>
<script type="text/javascript" src="${s.base}/js/base/base.js"></script>
<script type="text/javascript">
    layui.use(['form', 'jquery','baseUtil','pageUtil'], function() {
        var form = layui.form,
            $ = layui.jquery,
            baseUtil = layui.baseUtil,
            pageUtil = layui.pageUtil;
			pageUtil.initDict("base_status",function (dictData) {
				pageUtil.showDict($("#status"), pageUtil.aceeptDictContentList(dictData, "base_status"), "",'${sysDictContent.status}');
			});
			//监听提交
			form.on('submit(submitBtn)', function(data){
				baseUtil.postMethodResult("/sysDictContent/addOrUpdate",data.field,function (result) {
					//刷新父页面
					parent.location.reload();
				});
				return false;
			});
    });
</script>
</body>
</html>